import java.util.Scanner;

//import java.util.Scanner;
//
//public class Test {
//    public static void main(String[] args) {
//        Scanner sc=new Scanner(System.in);
//        int year=sc.nextInt();
//        int mon=sc.nextInt();
//        int day=sc.nextInt();
//        Birthday bir=new Birthday();
//        bir.setYear(year);
//        bir.setMonth(mon);
//        bir.setDay(day);
//        System.out.println("age="+bir.getAge());
//    }
//}
//class Birthday{
//    private int year;
//    private int month;
//    private int day;
//
//    public void setYear(int year) {
//        this.year = year;
//    }
//
//    public void setMonth(int month) {
//        this.month = month;
//    }
//
//    public void setDay(int day) {
//        this.day = day;
//    }
//
//    public int getYear() {
//        return year;
//    }
//
//    public int getMonth() {
//        return month;
//    }
//
//    public int getDay() {
//        return day;
//    }
//    public int getAge(){
//        int y=getYear();
//        int m=getMonth();
//        int d=getDay();
//        int age=2017-y;
//        if ((m == 12 && d >= 25)) {
//
//            age++;
//        }
//        return age;
//    }
//}
//public class Test {
//    public static void main(String[] args) {
//        Scanner sc=new Scanner(System.in);
//        int n=sc.nextInt();
//        Student[] s=new Student[n];
//        for(int i=0;i<n;i++){
//            String num=sc.next();
//            String name=sc.next();
//            int age=sc.nextInt();
//            s[i] = new Student(num, name, age);
//            if(age>=7&&age<=60){
//                System.out.println(s[i].getNum()+" "+s[i].getName()+" "+s[i].getAge());
//            }else{
//                System.out.println("bad");
//            }
//        }
//    }
//}
//class Student{
//    private String num;
//    private String name;
//    private int age;
//
//    public Student(String num, String name, int age) {
//        this.num = num;
//        this.name = name;
//        this.age = age;
//    }
//
//    public String getNum() {
//        return num;
//    }
//
//    public String getName() {
//        return name;
//    }
//
//    public int getAge() {
//        return age;
//    }
//}
//public class Test {
//    public static void main(String[] args) {
//        Scanner sc=new Scanner(System.in);
//        int xUp=sc.nextInt();
//        int yUp=sc.nextInt();
//        int xDown=sc.nextInt();
//        int yDown=sc.nextInt();
//        MyRectangle myrectangle=new MyRectangle(xUp,yUp,xDown,yDown);
//        System.out.println(myrectangle.getW());
//        System.out.println(myrectangle.getH());
//        System.out.println(myrectangle.area());
//
//}
//}
//class MyRectangle {
//    private int xUp;
//    private int yUp;
//    private int xDown;
//    private int yDown;
//
//    public MyRectangle(int xUp, int yUp, int xDown, int yDown) {
//        this.xUp = xUp;
//        this.yUp = yUp;
//        this.xDown = xDown;
//        this.yDown = yDown;
//    }
//
//    public MyRectangle() {
//    }
//
//    public int getW() {
//        return xDown-xUp;
//    }
//
//    public int getH() {
//        return yDown - yUp;
//    }
//
//    public int area() {
//        return getH() * getW();
//    }
//}

//public class Test {
//    public static void main(String[] args) {
//        Scanner sc=new Scanner(System.in);
//        double num1=sc.nextDouble();
//        double num2=sc.nextDouble();
//        Calculator cal=new Calculator(num1,num2);
//        System.out.println(num1+" + "+num2+" = "+ cal.add());
//        System.out.println(num1+" - "+num2+" = "+ cal.minus());
//        System.out.println(num1+" * "+num2+" = "+ cal.multiple());
//        System.out.println(num1+" / "+num2+" = "+ cal.divide());
//
//    }
//}
//class Calculator{
//    private double num1;
//    private double num2;
//    public double add(){
//        return num1+num2;
//    }
//    public double minus(){
//        return num1-num2;
//    }
//    public double multiple(){
//        return num1*num2;
//    }
//    public double divide(){
//        return num1/num2;
//    }
//
//    public Calculator(double num1, double num2) {
//        this.num1 = num1;
//        this.num2 = num2;
//    }
//}

public class Test {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        String name=sc.next();
        String password=sc.next();
        String rightPassword1=sc.next();
        double deposit=sc.nextDouble();
        String errorPassword1=sc.next();
        double withdraw=sc.nextDouble();
        String rightPassword2=sc.next();
        double moreDeposit=sc.nextDouble();
        String rightPassword3=sc.next();
        double lessDeposit=sc.nextDouble();
        BankBusiness bank=new BankBusiness(name,password,0);
        BankBusiness.welcome();
        bank.deposit(rightPassword1,deposit);
        bank.withdraw(errorPassword1,withdraw);
        bank.withdraw(rightPassword2,moreDeposit);
        bank.withdraw(rightPassword3,lessDeposit);
        BankBusiness.welcomeNext();
    }
}
class BankBusiness{
    public static String bankName="中国银行";
    private String name;
    private String password;
    private double balance;
    public static void welcome(){
        System.out.println(bankName+"欢迎您的到来!");
    }
    public static void welcomeNext(){
        System.out.println("请收好您的证件和物品，欢迎您下次光临！");
    }

    public BankBusiness(String name, String password, double balance) {
        this.name = name;
        this.password = password;
        this.balance = balance;
    }
    public void deposit(String password,double money){
        if(!password.equals(this.password)){
            System.out.println("您的密码错误！");
        }else{
            this.balance+=money;
            System.out.println("您的余额有"+this.balance+"元。");
        }
    }
    public void withdraw(String password,double money){
        if(!password.equals(this.password)){
            System.out.println("您的密码错误！");
        }else if(this.balance<money){
            System.out.println("您的余额不足！");
        }else{
            this.balance-=money;
            System.out.println("您的余额还有"+this.balance+"元。");
        }
    }
}